﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VersionComparer.Base
{
    public static class IDisposableExtensions
    {
        /// <summary>
        /// Disposes an object if not null
        /// </summary>
        /// <param name="disposableObject">object to dispose</param>
        public static void DisposeObject(this IDisposable disposableObject)
        {
            if (disposableObject != null)
            {
                disposableObject.Dispose();
            }
        }
    }
}
